package day3;

import java.io.*;

public class Homework {
    public static void main(String[] args) {
        demo1();
    }
    public static void demo1(){
        try(FileInputStream fis=new FileInputStream("d://CloudMusic//wyyun//MV//EXO.mp4");
            FileOutputStream fos=new FileOutputStream("d://CloudMusic//wyyun//MV//EXO2.mp4");
            BufferedInputStream bis=new BufferedInputStream(fis);
            BufferedOutputStream bos=new BufferedOutputStream(fos)
            ) {
            long start=System.currentTimeMillis();
            int sum=0;
            long read=0;
            byte[] bs=new byte[1024];
            int len=0;
            while ((len=bis.read(bs))!=-1){
                read+=len;
                bos.write(bs,0,len);
                /*if(read>=sum/10*n){
                    long end=System.currentTimeMillis();
                    System.out.println("复制了"+n+"%");
                }*/
            }


        }catch (IOException e){
            e.printStackTrace();
        }
    }
}

